/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.emergency.service.api;

import com.koron.common.bean.StaffBean;
import com.koron.common.domain.DataBean;
import com.koron.emergency.domain.ResponseLevel;
import com.koron.emergency.domain.ContingencyPlan;
import org.koron.ebs.mybatis.SessionFactory;
import org.springframework.web.multipart.MultipartFile;
import org.swan.bean.MessageBean;

import java.util.List;
import java.util.Map;

public interface ContingencyPlanService {

    /**
     * 保存应急预案
     *
     * @param bean              应急预案实体类
     * @param responseLevelList 响应等级
     * @param keepFiles
     * @param delFiles
     * @param files
     * @return
     */
    MessageBean<Integer> save(ContingencyPlan bean, List<ResponseLevel> responseLevelList, String keepFiles, String keepPDFFiles, String delFiles, String delPDFFiles, MultipartFile[] files, StaffBean user, String approverCodeListStr, String jobsTasksId);

    /**
     * 根据id查询应急预案
     *
     * @param id
     * @return
     */
    MessageBean<ContingencyPlan> queryOne(String id);

    /**
     * 根据id删除应急预案
     *
     * @param id
     * @return
     */
    MessageBean<Integer> delete(String id, StaffBean user,String approverCodeListStr);

    /**
     * 根据条件分页查询应急预案列表详情
     *
     * @param corpCode            水司code
     * @param contingencyPlanName 应急预案名称
     * @param contingencyPlanType 应急预案类型
     * @param start               开始页
     * @param rows                每页条数
     * @return
     */
    MessageBean<DataBean<ContingencyPlan>> list(String corpCode, String contingencyPlanName, String contingencyPlanType, Integer start, Integer rows);

    /**
     * 根据条件查询所有应急预案
     *
     * @param corpCode            水司code
     * @param contingencyPlanName 应急预案名称
     * @return
     */
    MessageBean<List<ContingencyPlan>> queryAll(String corpCode, String contingencyPlanName);

    String generateCode(SessionFactory factory, String corpCode, String ContingencyPlanType);

    /**
     * 根据应急预案id查询响应等级信息
     *
     * @param contingencyPlanId 应急预案id
     * @return
     */
    MessageBean<List<ResponseLevel>> queryByContingencyPlanId(String contingencyPlanId);

    MessageBean<?> getProcessData(String ids);

    MessageBean<Map> getResponseLevel(String id);

    List<ContingencyPlan> exportList(StaffBean user, String corpCode, String contingencyPlanName, String contingencyPlanType);

}
